package cn.bdqn.service.impl;

import cn.bdqn.mapper.VehicleComplaintsMapper;
import cn.bdqn.pojo.VehicleComplaints;
import cn.bdqn.service.VehicleComplaintsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
public class VehicleComplaintsServiceImpl implements VehicleComplaintsService {
    @Resource
    VehicleComplaintsMapper vehicleComplaintsMapper;
    @Override
    public List<VehicleComplaints> selectAll(Long brandId) {
        return vehicleComplaintsMapper.selectAll(brandId);
    }
    @Transactional
    @Override
    public int insert(VehicleComplaints veh) {
        return vehicleComplaintsMapper.insert(veh);
    }
    @Transactional
    @Override
    public int update(Long id, Integer sta) {
        return vehicleComplaintsMapper.updateStatus(id,sta);
    }
}
